package com.zjw.project.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 测试
 * @author geliang
 *
 */
@Controller
@RequestMapping("user")
public class UserController {
	
	/**
	 * 登录
	 * @return
	 */
	@RequestMapping(value = "login", method = RequestMethod.GET)
	public String login() {
		return "login";
	}

	/**
	 * 登录
	 * @param username 账号
	 * @param password 密码
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "login", method = RequestMethod.POST)
	public Map<String, Object> login(String username, String password) {
		Map<String, Object> result = new HashMap<String, Object>();
		result.put("demo", "success");
		return result;
	}
	
	@RequestMapping("te")
	public String te() {
		return "te";
	}
}
